import com.enzoism.spring.entity.User;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @program: Java_Spring01
 * @description: SpringBean对象获取测试
 * @author: zhifeng
 * @create: 2020-12-22 12:53
 */
public class TestSpringBean {

    @Test
    public void testSpringBean(){
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        User user = context.getBean("userBeanTest", User.class);
        System.out.println(user);
    }
}